package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.LogicExpressionAndContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.LogicExpressionOrContext;

/**
 * 逻辑表达式语法遍历
 * 
 * @author zwd
 *
 */
public class LogicExpressionOrVisitor extends AbsCQLParserBaseVisitor<LogicExpressionOrContext> {

	private LogicExpressionOrContext context = null;

	public LogicExpressionOrVisitor() {
		context = new LogicExpressionOrContext();
	}

	@Override
	protected LogicExpressionOrContext defaultResult() {
		return context;
	}

	@Override
	public LogicExpressionOrContext visitLogicExpressionAnd(@NotNull LogicExpressionAndContext ctx) {
		LogicExpressionAndVisitor visitor = new LogicExpressionAndVisitor();
		context.getExpressions().add(visitor.visit(ctx));
		return context;
	}

}
